package com.smomo.blog.service.front;
import com.smomo.blog.common.ResponseResult;
import com.smomo.blog.dto.EmailLoginDTO;
import com.smomo.blog.dto.UserInfoDTO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static cn.dev33.satoken.strategy.SaStrategy.me;

public interface ApiUserService {

    /**
     * 邮箱登录
     * @param emailLoginDTO
     * @return
     */
    public ResponseResult emailLogin(EmailLoginDTO emailLoginDTO);

    /**
     * 获取用户信息
     * @return
     */
    public ResponseResult selectUserInfo();

    /**
     * 修改用户信息
     * @param vo
     * @return
     */
    public ResponseResult updateUser(UserInfoDTO vo);

    /**
     * 根据token获取用户信息
     * @param token
     * @return
     */
    public ResponseResult selectUserInfoByToken(String token);


//    /**
//     * 第三方登录授权之后的逻辑
//     * @param response
//     * @param source
//     * @param httpServletResponse
//     * @throws IOException
//     */
//    public void authLogin(AuthResponse response, String source, HttpServletResponse httpServletResponse) throws IOException;

}
